## Table A4

#directory
#set working directory to the path PvP_Replication
#setwd("~/PvP_Replication")

#packages
library(tidyverse) #for data cleaning and manipulation
library(texreg) #generate latex table 
library(estimatr) #estimation

#load main dataset
pvp_data <- read.csv("PvP_data/PvP_data_main.csv")

#subset to former FARC municipalities 
pvp_farc_subset <- pvp_data %>% filter(farc_presence == 1)

#estimate model with survey measure as dependent variable 
dv_validate_model <- lm_robust(maps_control_prop ~ dissident_presence, pvp_farc_subset %>% 
                                 filter(!is.na(maps_control_prop)))

#create latex table for results
texreg(dv_validate_model,
       custom.coef.names	= c(NA, "Splinter Group Presence Measure"),
       digits = 2, include.ci = FALSE, single.row = FALSE, include.fstatistic = TRUE, 
       include.rmse = FALSE, include.rsquared = FALSE, include.adjrs = FALSE, 
       include.nobs = TRUE, stars = c(0.001, 0.01, 0.05), float.pos = "h", 
       caption.above	= TRUE, caption = "Validating Splinter Group Presence with Survey Data")
